/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package swingDemoEvent;

/**
 *
 * @author Administrator
 */
import java.awt.BorderLayout;

import java.awt.Color;
import java.awt.Font;
import javax.swing.JButton;
import javax.swing.JFrame;

public class BorderLayoutTest extends JFrame {

    JButton b1 = new JButton("north");
    JButton b2 = new JButton("south");
    JButton b3 = new JButton("center");
    JButton b4 = new JButton("east");
    JButton b5 = new JButton("west");

    public BorderLayoutTest(String title) {
        super(title);
        setSize(200, 200);
        setLocation(100, 50);
        setBackground(Color.RED);
         Font font1=new Font("黑体",Font.ITALIC,20);
        setFont(font1);
        setLayout(new BorderLayout());

        add("North", b1);
        add("South", b2);
        add("Center", b3);
        add("East", b4);
        add("West", b5);

        setVisible(true);
    }

    public static void main(String args[]) {
        BorderLayoutTest f1 = new BorderLayoutTest("hello");
    }
}
